1. Field of the Invention
The present invention relates to the information processing field. More particularly, the invention relates to a mechanism for sharing data between application environments.
2. Background of the Related Art
The Internet is a global set of interconnected computer networks communicating via a protocol known as the Transmission Control Protocol and Internet Protocol (TCP/IP). The World Wide Web (WWW) is a fully distributed system for sharing information that is based upon the Internet. Information shared via the WWW is typically in the form of HyperText Markup Language (HTML) pages. A display screen presented to a user via, e.g., a browser program, may comprise a singe HTML page or a plurality of HTML pages running within respective frames. An exemplary browser program comprises the Netscape(copyright) Navigator browser provided by Netscape Communications Corporation of Mountain View, Calif.
HTML pages are associated with particular WWW logical addresses and are communicated between WWW-compliant systems using the HyperText Transport Protocol (HTTP). In addition to standard text and graphics, HTML pages may include information structures known as xe2x80x9chypertextxe2x80x9d or xe2x80x9chypertext links.xe2x80x9d Hypertext, within the context of the WWW, is typically a graphic or textual portion of a page which includes an address parameter contextually related to another HTML page. By accessing a hypertext link, a user of the WWW retrieves the HTML page associated with that hypertext link.
HTML pages may also include information structures known as xe2x80x9capplets,xe2x80x9d which are small programs that are designed to run within another application, such as a browser. Within the browser context, an applet within an HTML page is typically executed upon the loading of the HTML page or upon the selection of an applet-representative object within the HTML page. An HTML page may include several-applets, such as an applet that executes upon opening the page and applets that execute upon the selection of respective applet-representative objects within the page.
It is often desirable to procure data from, e.g., a user interacting with an applet running within an HTML page and utilize the data at a future time. As such, it is also desirable to save the data such that the data is available at that future time. Interactive web pages typically store data in one of three ways; namely, within JavaScript variables, as xe2x80x9ccookies,xe2x80x9d and by calling a CGI (Computer Gateway Interface) program.
JavaScript is a scripting language that is interpreted by a web page to provide applet-like functionality and store data. JavaScript is a trademark of Sun Microsystems, Inc. of Palo Alto, California. Unfortunately, JavaScript data is lost when the HTML page is changed, which tends to require that all information gathering functions and information processing functions be performed using a single, relatively large JavaScript segment. Unfortunately, an HTML page with such a large amount of JavaScript will load into a browser slowly. Moreover, JavaScript code may be examined even by a casual observer, thereby reducing security of the code.
Cookies are small pieces of information that are sent to a browser along with an accessed HTML page. When the cookie arrives, the browser generally saves this information to the user""s hard disk drive such that the cookie xe2x80x9cpersistsxe2x80x9d or remains beyond the termination of the browser program. The cookie may be subsequently retrieved and/or modified by the cookie xe2x80x9cownerxe2x80x9d when the user again accesses the HTML page (or any page provided by the xe2x80x9cownerxe2x80x9d of the cookie). Cookies, while persistent on the client and thus not lost when the HTML page is changed, create various usability problems. Specifically, cookies are disfavored by a substantial number of users due to privacy and/or security concerns. These users do not allow the use of cookies on their systems and, therefore, the use of cookies to store or share data is impossible for these users.
A CGI program is a computer program that runs on a Web server. These programs use a specific API (application programming interface) called the Common Gateway Interface (CGI) to perform tasks such as accessing databases (e.g., to store data) and processing forms. CGI programs may be compiled programs or noncompiled programs (i.e., scripts). Unfortunately, CGI programs are relatively complex and, therefore, require substantial memory and other resources to implement. Such complexity and relatively high resource utilization is ill-suited to data storage within the context of a quick loading and executing applet interacting with a user via a browser application. Also, CGI scripts are unavailable if the HTML is separated from the server, such as when the HTML is stored on a compact disk.
The present invention generally provides a method and apparatus for dynamically sharing data between application environments such that the data persists beyond the termination of a data-providing application environment.
Specifically, a method according to the invention for sharing data between application environments, comprises the steps of: linking at least one data-representative object associated with a first application environment to a storage location associated with a second application environment, the storage location being modified in response to modifications made to the data-representative object associated with the first application environment.
In one embodiment of the invention, each of a plurality of HTML pages having respective applets are sequentially loaded within a visible frame in response to, e.g., user interaction. An HTML page within a hidden frame is used to provide storage for variables utilized by the various applets. That is, a xe2x80x9cvisible framexe2x80x9d applet stores and retrieves data from a xe2x80x9chidden framexe2x80x9d HTML page. The data may be processed by a hidden frame applet. In this manner, the data produced by a visible frame applet persists beyond the termination of the HTML page (or other application environment) supporting the applet.